package com.example.onlineanswer.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 答题记录实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("answer_record")
public class AnswerRecord extends BaseEntity {

    /**
     * 参赛记录ID
     */
    @TableField("participation_id")
    private Long participationId;

    /**
     * 题目ID
     */
    @TableField("question_id")
    private Long questionId;

    /**
     * 答案内容（选择题选项ID或填空题答案）
     */
    @TableField("answer_content")
    private String answerContent;

    /**
     * 是否正确（0：错误，1：正确，null：未判定）
     */
    @TableField("is_correct")
    private Boolean correct;

    /**
     * 得分
     */
    @TableField("score")
    private Integer score;

    /**
     * 用时（秒）
     */
    @TableField("time_used")
    private Integer timeUsed;

    /**
     * 提交时间
     */
    @TableField("submit_time")
    private LocalDateTime submitTime;
} 